package com.zian.controller.user;


import com.zian.common.R;

import com.zian.domain.vo.IndexConfigVO;

import com.zian.service.ISysIndexConfigService;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import lombok.RequiredArgsConstructor;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author
 * @since 2024-09-08
 */
@Slf4j
@Api(tags= "首页推荐配置管理")
@RestController("SysIndexConfigControllerUser")
@RequestMapping("/user/index-configs")
@RequiredArgsConstructor
public class SysIndexConfigController {

    private final ISysIndexConfigService indexConfigService;

    @GetMapping("/list")
   @ApiOperation("查询首页配置列表")
    public R<List<IndexConfigVO>> getIndexConfigList(Integer type) {
        log.info("查询首页配置列表 : 查询类型：{}", type);
        List<IndexConfigVO> vos = indexConfigService.getIndexConfigList(type);
        return R.ok(vos);
    }

}
